﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TEST.aspx.cs" Inherits="ZHONGLANGWORD.WebOffice.TEST" %> 
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title> 
</head>
<body>
    <form id="form1" runat="server">
    <asp:Label ID="lblMsg" runat="server" ForeColor="Red" Text ="请用兼容模式打开本页面，并设置本站点为可信站点" />
    <asp:HyperLink ID="hrlIETRUST" runat="server" Text ="(如何设置可信站点)"  NavigateUrl="IETRUST.mht" Target="_blank" />
    <br />

    <object id="WebOffice1" style="width:100%;height:520px;LEFT: 0px; TOP: 0px" 
            classid="clsid:E77E049B-23FC-4DB8-B756-60529A35FAD5" 
            codebase="../WebOffice/WebOffice.ocx#Version=3,0,0,0">
	        <param name="_Version" value="65536" />
	        <param name="_ExtentX" value="2646" />
	        <param name="_ExtentY" value="1323" />
	        <param name="_StockProps" value="0" /> 
    </object>   
    <br /> 

    将模板中的标记<asp:TextBox ID="txtMarkName" Text="@NAME@"  runat="server" /> 
    修改成<asp:TextBox ID="txtMarkValue" Text="测试用户"  runat="server" /> 
    <asp:Button ID="btnReload" runat="server" Text="重新加载模板"  OnClick="btnReload_Click" />
    <asp:CheckBox ID="chkMark" runat="server" Text="保存时增加签名图片" Checked="true" />
    <br />

    <asp:TextBox ID="hidCurrHttpUrl" Text="" Width="500px" runat="server" /> 
    <asp:TextBox ID="hidCurrTempFile" Text="" Width="500px" runat="server" /> 

    <asp:Button ID="btnSave" runat="server" Text="WordSave" style="display:none" OnClick="btnSave_Click" />
    <asp:HyperLink ID="hrlCheck" runat="server" Text ="点此查看保存效果" Visible="false" NavigateUrl="TESTOK.doc" Target="_blank" />
    <script language="javascript" for="WebOffice1" event="NotifyCtrlReady">
        WebOffice1_NotifyCtrlReady();
    </script>
    <script> 
        function WebOffice1_NotifyCtrlReady() { 
            var vPath = document.getElementById("hidCurrHttpUrl").value + document.getElementById("hidCurrTempFile").value; 
            document.all.WebOffice1.LoadOriginalFile(vPath, "doc");
            document.all.WebOffice1.SetTrackRevisions(1);
            document.all.WebOffice1.ShowRevisions(1);
            document.all.WebOffice1.ShowToolBar = 0; 
        }  
        function funDocSave() { document.all.WebOffice1.Save(); return true; } 
    </script>  

    </form>
</body>
</html>
